
package com.insigma.business.qrcode.soldier.dao;



import com.insigma.business.qrcode.common.annotation.Crypt;
import com.insigma.business.qrcode.soldier.dto.PlacementSoldierAspirationBSearcher;
import com.insigma.business.qrcode.soldier.entity.PlacementSoldierAspirationDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;


public interface PlacementSoldierAspirationDao {

    
    List<PlacementSoldierAspirationDO> search(final PlacementSoldierAspirationBSearcher innerSearcher);

    
    PlacementSoldierAspirationDO get(final String id);

    
    Integer insert(final PlacementSoldierAspirationDO placementSoldierAspirationDO);

    
    Integer update(final PlacementSoldierAspirationDO placementSoldierAspirationDO);

    
    Integer delete(@Param("id") final String id,
                   @Param("modifierType") final String modifierType,
                   @Param("modifierId") final String modifierId);

    int countBySoldier(String soldierId);

    List<PlacementSoldierAspirationDO> listBySoldier(String soldierId);

    List<PlacementSoldierAspirationDO> getByPositionId(@Param("positionId")String positionId, @Param("status")String status);

    void batchDeleteBySoldierId(@Param("soldierId") String soldierId,
                                @Param("modifierType") final String modifierType,
                                @Param("modifierId") final String modifierId);

    @Crypt(encryptParamIndex = {0})
    int countByIdCardNo(String idCardNo);

    @Crypt(encryptParamIndex = {0})
    List<PlacementSoldierAspirationDO> listByIdCardNo(String idCardNo);

    @Crypt(encryptParamIndex = {0})
    int batchDeleteByIdCardNo(@Param("idCardNo")String idCardNo, @Param("modifierType")String modifierType, @Param("modifierId")String modifierId);

    int countByPositionId(@Param("positionId")String positionId, @Param("status")String status);

    @Crypt(encryptParamIndex = {0})
    List<PlacementSoldierAspirationDO> listByIdCardNoAndBatchId(@Param("idCardNo")String idCardNo, @Param("batchId")String batchId);

    @Crypt(encryptParamIndex = {0})
    List<PlacementSoldierAspirationDO> listByIdCardNoAndType(@Param("idCardNo")String idCardNo, @Param("type")String type);

    List<PlacementSoldierAspirationDO> listByBatchId(String batchId);

    List<PlacementSoldierAspirationDO> listByBatchIdAndStatus(@Param("batchId")String batchId, @Param("status")String status);

    Integer count(PlacementSoldierAspirationBSearcher bSearcher);

    @Crypt(encryptParamIndex = {1})
    PlacementSoldierAspirationDO getByPositionIdAndIdCardNo(@Param("positionId")String positionId, @Param("idCardNo")String idCardNo);

    @Crypt(encryptParamIndex = {0})
    PlacementSoldierAspirationDO getLastDeletedThroughAsp(String idCardNo);

    Integer updateCheckFlag(@Param("placementId")String placementId, @Param("checkFlag")String checkFlag);
}
